﻿<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style>
          <table width="100%" border="0" cellpadding="0" cellspacing="0" class="in_dazhe">
<?php
             if($ClassID){
		     $sql="SELECT * FROM Netsys_News where ClassID=".$ClassID." order by NID desc";
		     }else{
             $sql="SELECT * FROM Netsys_News order by NID desc";
			 }

//取得总信息数
$result=mysql_query($sql);
$total=mysql_num_rows($result);
//调用pageft()，每页显示10条信息（使用默认的20时，可以省略此参数），使用本页URL（默认，所以省略掉）。
pageft($total,$onesum);
//现在产生的全局变量就派上用场了
             if($ClassID){
		     $result=mysql_query("SELECT * FROM Netsys_News where ClassID=".$ClassID." order by NID desc");
		     }else{
             $result=mysql_query("SELECT * FROM Netsys_News order by NID desc limit $firstcount,$displaypg");
			 }
if($total!=0){
while($row=mysql_fetch_array($result)){
//（列表内容略）
?>
<tr>
<td width="6%" height="28" nowrap="nowrap" class="gary"><? $rs="SELECT * FROM Netsys_News_Class where ClassID=".$row[ClassID]." order by ClassOrder Asc";$query=mysql_query($rs); $num=mysql_num_rows($query);if($num!=0){ $ro=mysql_fetch_array($query); echo $ro['ClassName'];}else { echo "类别不存在";}?></td>
<td width="1%" align="center" nowrap="nowrap" >&nbsp;<img src="images/line2.jpg" width="1" height="6" />&nbsp;</td>
<td width="65%" nowrap="nowrap"><a href="<? echo $url;?>?NID=<? echo $row['NID'];?>" target="_blank"><?php echo cutstr( $row['NTitle'],$suma);echo ("...");?></a></td>
<td width="28%" align="right" nowrap="nowrap" class="data"><? echo $row['NTime'];?></td>
</tr>
<?
}
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="40" align="center">
<?
echo $pagenav;
?> 
            
	</td>
  </tr>
</table>
<?php
}
else{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="30" align="center">暂无信息，敬请期待！</td>
                </tr>
          </table>
            <?
			}
			?>